import dayjs from 'dayjs'
export const reanListToTreeData = (depts, pid) => {
  const arr = []
  depts.forEach(item => {
    if (item.pid === pid) {
      // 递归方法
      item.children = reanListToTreeData(depts, item.id)
      arr.push(item)
    }
  })
  return arr
}
// 时间处理方法
export const fromatTime = (item, str) => {
  return dayjs(item).format(str)
}
